home *** CD-ROM | disk | FTP | other *** search
/ CBM Funet Archive / cbm-funet-archive-2003.iso / cbm / demodisks / drives / 1581-demo.lzh / change unit (.txt) < prev    next >
Commodore BASIC  |  1994-10-19  |  2KB  |  49 lines

  1. 10 z$=chr$(0): b$=chr$(2):ln$="[155][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192][192]"
  2. 15 poke53280,0:poke53281,0:gosub20:goto30
  3. 20 print "[147]"ln$:print"[159]  change disk device number":println$:return
  4. 30 print " if  all [146] disk units are still"
  5. 40 print " device nr 8, then power-off all"
  6. 50 print " but the first unit to be changed."
  7. 60 input " [155] old [146] device nr (8-15): ? 8 [157][157][157][157]";f
  8. 70 if f<8 or f>15 then print "[145][145][145]": goto 60
  9. 80 input " [155] new [146] device nr (8-15): ? 9 [157][157][157][157]";t
  10. 90 if t<8 or t>15 then print "[145][145][145]": goto 80
  11. 100 close 1:open 1,f,15: if st then 240
  12. 110 print#1,"m-r"chr$(255)chr$(255)
  13. 120 gosub 220: gosub 270
  14. 130 print "[155] unit-type/dos vers: ";a$
  15. 135 ifm=666then print#1,"u0>"+chr$(t):goto150
  16. 140 print#1,"m-w"chr$(m)z$b$chr$(t+32)chr$(t+64)
  17. 150 if st then 240
  18. 160 print "[155] device";f;"[155]changed to device";t
  19. 170 input "[155] change more units (y/n): ? n[157][157][157]";c$
  20. 180 if c$="n" then 260
  21. 190 if c$<>"y" then print "[145][145][145]": goto 170
  22. 200 print "[147]":gosub20:print"[155] ok, power-on next unit to change"
  23. 210 goto 60
  24. 220 get#1,c$: c=asc(c$+z$)
  25. 230 if st=0 then return
  26. 240 print "[155] device error on";f: goto 260
  27. 250 print "[155] unknown device type";f
  28. 260 close 1: end
  29. 270 if c=198 then m=12: goto 350
  30. 280 if c=255 then m=12: a$="d90xx / v3.0":gosub900
  31. 290 if c=254 then m=119: a$="1571-1541/v3.0-2.6"
  32. 300 if c=242 then m=12: a$="8050 / v2.5"
  33. 310 if c=241 then m=12: a$="1551 / v2.6"
  34. 320 if c=226 then m=50: a$="2040 / v1.2"
  35. 330 if c=213 then m=12: a$="4040 / v2.1"
  36. 340 return
  37. 350 print#1,"m-r"chr$(234)chr$(16)
  38. 360 gosub 220: if c>1 then 2700
  39. 370 if c=0 then a$="4040 / v2.7":return
  40. 380 print#1,"m-r"chr$(172)chr$(16)
  41. 390 gosub 220: if c<1 or c>2 then 250
  42. 400 if c=1 then a$="8050 / v2.7"
  43. 410 if c=2 then a$="8250 / v2.7"
  44. 420 return
  45. 900 print#1,"m-r"chr$(3)chr$(164)chr$(1):get#1,a$:a$=a$+chr$(0)
  46. 910 ifasc(a$)=0thenreturn
  47. 920 ifa$="8"thenm=666
  48. 930 m=666:a$="1581 / v10":return
  49.